option(WITH_ICECC "Distribute build with icecc." OFF)
if(WITH_ICECC)
  find_program (ICECC_EXECUTABLE icecc)
  if(ICECC_EXECUTABLE)
    message(STATUS "Building with icecc: ${ICECC_EXECUTABLE}")
    list(APPEND CMAKE_C_COMPILER_LAUNCHER "${ICECC_EXECUTABLE}")
    list(APPEND CMAKE_CXX_COMPILER_LAUNCHER "${ICECC_EXECUTABLE}")
  else(ICECC_EXECUTABLE)
    message(FATAL_ERROR "Can't find icecc. Is it installed?")
  endif(ICECC_EXECUTABLE)
endif(WITH_ICECC)
